import request from '@/utils/request'

// 查询物资出库列表
export function listWzck(query) {
  return request({
    url: '/wzgl/wzck/list',
    method: 'get',
    params: query
  })
}

// 查询物资出库详细
export function getWzck(wzckId) {
  return request({
    url: '/wzgl/wzck/' + wzckId,
    method: 'get'
  })
}

// 新增物资出库
export function addWzck(data) {
  return request({
    url: '/wzgl/wzck',
    method: 'post',
    data: data
  })
}

// 报废出库
export function insertBfCk(data) {
  return request({
    url: '/wzgl/wzck/insertBfCk',
    method: 'post',
    data: data
  })
}

// 个人领用出库
export function insertGrLyCk(data) {
  return request({
    url: '/wzgl/wzck/insertGrLyCk',
    method: 'post',
    data: data
  })
}

// 修改物资出库
export function updateWzck(data) {
  return request({
    url: '/wzgl/wzck',
    method: 'put',
    data: data
  })
}

// 确定出库
export function updateQdck(data) {
  return request({
    url: '/wzgl/wzck/qdck',
    method: 'put',
    data: data
  })
}

// 删除物资出库
export function delWzck(wzckId) {
  return request({
    url: '/wzgl/wzck/' + wzckId,
    method: 'delete'
  })
}

// 一级库物资出库Top10
export function getWzCkTop() {
  return request({
    url: '/wzgl/wzck/getWzCkTop',
    method: 'get'
  })
}
